package com.ymttest.database.mapping.withdraw;

import com.ymttest.database.model.withdraw.Ymt_InvoiceApprovment;
import com.ymttest.database.model.withdraw.Ymt_InvoiceApprovmentExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface Ymt_InvoiceApprovmentMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_InvoiceApprovment
     *
     * @mbggenerated Wed Jul 31 11:21:19 CST 2019
     */
    @Delete({
        "delete from Ymt_InvoiceApprovment",
        "where ID = #{ID,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String ID);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_InvoiceApprovment
     *
     * @mbggenerated Wed Jul 31 11:21:19 CST 2019
     */
    @Insert({
        "insert into Ymt_InvoiceApprovment (ID, InvoiceId, ",
        "UserLoginId, UserId, ",
        "ApprovalLevel, ApprovalStatus, ",
        "ApprovalResult, CreateTime)",
        "values (#{ID,jdbcType=VARCHAR}, #{invoiceId,jdbcType=VARCHAR}, ",
        "#{userLoginId,jdbcType=NVARCHAR}, #{userId,jdbcType=INTEGER}, ",
        "#{approvalLevel,jdbcType=INTEGER}, #{approvalStatus,jdbcType=BIT}, ",
        "#{approvalResult,jdbcType=NVARCHAR}, #{createTime,jdbcType=TIMESTAMP})"
    })
    int insert(Ymt_InvoiceApprovment record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_InvoiceApprovment
     *
     * @mbggenerated Wed Jul 31 11:21:19 CST 2019
     */
    @InsertProvider(type=Ymt_InvoiceApprovmentSqlProvider.class, method="insertSelective")
    int insertSelective(Ymt_InvoiceApprovment record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_InvoiceApprovment
     *
     * @mbggenerated Wed Jul 31 11:21:19 CST 2019
     */
    @SelectProvider(type=Ymt_InvoiceApprovmentSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="InvoiceId", property="invoiceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserLoginId", property="userLoginId", jdbcType=JdbcType.NVARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="ApprovalLevel", property="approvalLevel", jdbcType=JdbcType.INTEGER),
        @Result(column="ApprovalStatus", property="approvalStatus", jdbcType=JdbcType.BIT),
        @Result(column="ApprovalResult", property="approvalResult", jdbcType=JdbcType.NVARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Ymt_InvoiceApprovment> selectByExample(Ymt_InvoiceApprovmentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_InvoiceApprovment
     *
     * @mbggenerated Wed Jul 31 11:21:19 CST 2019
     */
    @Select({
        "select",
        "ID, InvoiceId, UserLoginId, UserId, ApprovalLevel, ApprovalStatus, ApprovalResult, ",
        "CreateTime",
        "from Ymt_InvoiceApprovment",
        "where ID = #{ID,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="InvoiceId", property="invoiceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserLoginId", property="userLoginId", jdbcType=JdbcType.NVARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="ApprovalLevel", property="approvalLevel", jdbcType=JdbcType.INTEGER),
        @Result(column="ApprovalStatus", property="approvalStatus", jdbcType=JdbcType.BIT),
        @Result(column="ApprovalResult", property="approvalResult", jdbcType=JdbcType.NVARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP)
    })
    Ymt_InvoiceApprovment selectByPrimaryKey(String ID);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_InvoiceApprovment
     *
     * @mbggenerated Wed Jul 31 11:21:19 CST 2019
     */
    @UpdateProvider(type=Ymt_InvoiceApprovmentSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Ymt_InvoiceApprovment record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_InvoiceApprovment
     *
     * @mbggenerated Wed Jul 31 11:21:19 CST 2019
     */
    @Update({
        "update Ymt_InvoiceApprovment",
        "set InvoiceId = #{invoiceId,jdbcType=VARCHAR},",
          "UserLoginId = #{userLoginId,jdbcType=NVARCHAR},",
          "UserId = #{userId,jdbcType=INTEGER},",
          "ApprovalLevel = #{approvalLevel,jdbcType=INTEGER},",
          "ApprovalStatus = #{approvalStatus,jdbcType=BIT},",
          "ApprovalResult = #{approvalResult,jdbcType=NVARCHAR},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP}",
        "where ID = #{ID,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(Ymt_InvoiceApprovment record);
}